In a database management system, multi-version concurrency control (MVCC) can be used to provide concurrent access to the database by multiple users or applications. With MVCC, a database user that is reading data from the database can be provided a consistent view of the data (e.g., a snapshot) even while another user is writing to the database at the same time (e.g., during the first user's read transaction). In order to provide the consistent view, transactions in MVCC that update or delete data in a record create a new record version.
While MVCC systems support fast and robust performance, problems can still occur. For example, in an MVCC system with many transactions that update or delete data, the number of record versions that are created, and need to be maintained, can grow quite large over time. Existing garbage collection techniques can be used to remove record versions that are obsolete, but existing garbage collection techniques have a number of problems. For example, existing garbage collection techniques that rely on a global minimum timestamp value only remove record versions that are lower than the global minimum timestamp value. As a result, many obsolete versions may remain uncollected, which can lead to increased usage of computing resources including memory and processor time.
Therefore, there exists ample opportunity for improvement in technologies related to garbage collection in MVCC database systems.